<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="824.48">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica; min-height: 22.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000; min-height: 12.0px}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #bf0000}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000}
span.s1 {font: 18.0px Helvetica}
span.s2 {color: #002aff}
span.s3 {color: #0000bf}
span.Apple-tab-span {white-space:pre}
</style>
</head>
<body>
<p class="p1"><span class="s1"><b>PulseDPW<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span></b></span><b>super-efficient square-wave oscillator with low aliasing</b></p>
<p class="p2"><br></p>
<p class="p1"><b>PulseDPW.ar(freq, width, mul, add)</b></p>
<p class="p3"><br></p>
<p class="p1">Use this just like the <a href="SC://Pulse"><span class="s2">Pulse</span></a> UGen - as with <a href="SawDPW.html"><span class="s2">SawDPW</span></a>, this uses the "Differentiated Parabolic Wave" technique to create a waveform extremely efficiently and with low (but not zero) aliasing.</p>
<p class="p3"><br></p>
<p class="p1"><b>freq</b> - Frequency in Hertz (control rate)</p>
<p class="p1"><b>width</b> - Pulse width ratio from zero to one. 0.5 makes a square wave. This cannot be modulated.</p>
<p class="p3"><br></p>
<p class="p1">This is actually a "pseudo-ugen" based on SawDPW rather than a separate UGen in itself, but is still very efficient. Compare the CPU usage in these examples:</p>
<p class="p4"><br></p>
<p class="p5">// modulate frequency</p>
<p class="p6">{ <span class="s3">Pulse</span> <span class="Apple-converted-space">  </span>.ar(<span class="s3">XLine</span>.kr(40,4000,6),0.1, 0.2) }.play;</p>
<p class="p6">{ <span class="s3">PulseDPW</span>.ar(<span class="s3">XLine</span>.kr(40,4000,6),0.1, 0.2) }.play;</p>
<p class="p4"><br></p>
<p class="p5">// two band limited square waves thru a resonant low pass filter</p>
<p class="p6">{ <span class="s3">RLPF</span>.ar(<span class="s3">Pulse</span> <span class="Apple-converted-space">  </span>.ar([100,250],0.5,0.1), <span class="s3">XLine</span>.kr(8000,400,5), 0.05) }.play;</p>
<p class="p6">{ <span class="s3">RLPF</span>.ar(<span class="s3">PulseDPW</span>.ar([100,250],0.5,0.1), <span class="s3">XLine</span>.kr(8000,400,5), 0.05) }.play;</p>
<p class="p4"><br></p>
</body>
</html>
